package registe.untill.baseUntill;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by zhoumeineng on 2018/1/28.
 *  全局异常 捕获
 *
 */
//@ControllerAdvice
public class ExceptionHandle {
    @ExceptionHandler(value = Exception.class)
    public void allExceptionHandler(HttpServletRequest req, HttpServletResponse rsp){
        MessageUntill.ResboneOutPut(rsp,MessageUntill.messageBody(null,"0002","服务器报错，请联系管理员"));
    }

}
